<?php
  //Elgg avis page
  // Load Elgg engine
		require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
	// Get the specified blog post
		$guid = (int) get_input('guid');
    $post = get_entity($guid);
	// Set the page owner
		set_page_owner($post->getOwner());
		$page_owner = get_entity($post->getOwner());
	//set  title
		if($page_owner == $_SESSION['user']){
      $area2 = '';
			$area2 .= elgg_view("validation_peda/demande", array('entity' => $post));
		}
	// Display them in the page
	$body = elgg_view_layout("two_column_left_sidebar",$area1, $area2);
	// Display page
	page_draw(sprintf(elgg_echo('avis:demande'),$page_owner->name),$body);
?>
